<template>
  <div>
    <h3>使用Attrs进行组件传参</h3>
    <HintButton
      type="primary"
      size="default"
      :icon="Edit"
      :title="title"
      @customClick="handleClick"
    ></HintButton>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import HintButton from './HintButton.vue'
import { Edit } from '@element-plus/icons-vue'

const title = ref('鼠标移入显示的提示文本')

const handleClick = (data: string) => {
  title.value = `${data}鼠标移入显示的提示文本`
}
</script>

<style scoped></style>
